home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 38
/
Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso
/
-seriously_amiga-
/
misc
/
ced_html
/
html
/
html_textaspect.ced
< prev
next >
Wrap
Text File
|
1999-01-25
|
4KB
|
111 lines
/*
** html_textaspect.ced
**
** $VER: html_textaspect.ced 1.3 (12.20.1998)
**
** Arexx script for HTML v3.2 text aspect
**
** This script works with CygnusEd Professional v4.2
**
** Copyright © Eric BELLE
*/
/*
**------------------------------------------------------------------------------
** Initialisation
**------------------------------------------------------------------------------
*/
OPTIONS RESULTS /* Tell CygnusEd to return results. */
NL = '0A'X /* Alias for new line. */
KRETURN = RAWKEY 68 /* Shortcut to the return key. */
KTAB = RAWKEY 66 /* Shortcut to the tab key. */
STATUS TABSARESPACES /* Return TAB mode ("tab" or "space"). */
IF RESULT = 1 /* Test the TAB mode. */
THEN "TABS = SPACES" /* Switch TAB mode from "space" to "tab". */
ELSE NOP /* No operation. */
TAB SIZE 1 /* Set TAB size proportional to 2 spaces. */
/*
**------------------------------------------------------------------------------
** Text aspect choice
**------------------------------------------------------------------------------
*/
TextAspectChoice="no"
DO WHILE (TextAspectChoice="no")
OKAY2 "Text aspect:" || NL ||,
"~~~~~~~~~~~" || NL ||,
" (0) - default | (9) - definition " || NL ||,
" (1) - italic | (10) - sample " || NL ||,
" (2) - bold | (11) - variable " || NL ||,
" (3) - underline | (12) - source code " || NL ||,
" (4) - subscript | (13) - citation " || NL ||,
" (5) - superscript | (14) - teletype " || NL ||,
" (6) - small | (15) - keybord " || NL ||,
" (7) - big | (16) - URL " || NL ||,
" (8) - strike | (17) - formated text "
IF (RESULT=0)
THEN EXIT 0
ELSE TextAspectChoice="ok"
GETNUMBER 0 '"Text aspect?"' 0 17
TextAspect = RESULT
IF (TextAspect=" ")
THEN TextAspectChoice = "no"
ELSE NOP
END
/*
**------------------------------------------------------------------------------
** Html text aspect marks
**------------------------------------------------------------------------------
*/
SELECT
WHEN (TextAspect=1) THEN TextAspectString = "I"
WHEN (TextAspect=2) THEN TextAspectString = "B"
WHEN (TextAspect=3) THEN TextAspectString = "U"
WHEN (TextAspect=4) THEN TextAspectString = "SUB"
WHEN (TextAspect=5) THEN TextAspectString = "SUP"
WHEN (TextAspect=6) THEN TextAspectString = "SMALL"
WHEN (TextAspect=7) THEN TextAspectString = "BIG"
WHEN (TextAspect=8) THEN TextAspectString = "STRIKE"
WHEN (TextAspect=9) THEN TextAspectString = "DFN"
WHEN (TextAspect=10) THEN TextAspectString = "SAMP"
WHEN (TextAspect=11) THEN TextAspectString = "VAR"
WHEN (TextAspect=12) THEN TextAspectString = "CODE"
WHEN (TextAspect=13) THEN TextAspectString = "CITE"
WHEN (TextAspect=14) THEN TextAspectString = "TT"
WHEN (TextAspect=15) THEN TextAspectString = "KBD"
WHEN (TextAspect=16) THEN TextAspectString = "ADDRESS"
WHEN (TextAspect=17) THEN TextAspectString = "PRE"
OTHERWISE NOP
END
/*
**------------------------------------------------------------------------------
** Html text aspect marks
**------------------------------------------------------------------------------
*/
IF (TextAspect=0)
THEN NOP
ELSE DO
TEXT "<" || TextAspectString || ">"
"AUTO-INDENT" ; KTAB
TEXT "Sould be modified - Text aspect"
"AUTO-INDENT" ; BACKTAB
TEXT "</" || TextAspectString || ">"
END
/*
**------------------------------------------------------------------------------
** End of html_textaspect.ced Arexx script
**------------------------------------------------------------------------------
*/
EXIT 0